package Thread;
//针对Runable匿名内部类重写run方法
public class dome4 {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("线程启动");
            }
        });
        t.start();
        Thread.sleep(1000);
        System.out.println("主线程启动...");
    }
}
